<template>
  <scroll-view
    :refresherBallisticRefreshEnabled="true"
    style="height: 100%"
    :scroll-y="true"
    @scrolltoupper="upper"
    @scrolltolower="lower"
    @scroll="scroll"
    :scroll-into-view="props.toView"
    :scroll-top="props.scrollTop"
  >
    <slot></slot>
  </scroll-view>
</template>
<script setup>

const props = defineProps({
  scrollTop: {
    type: [String, Number],
    default: 0,
  },
  toView: {
    type: String,
    default: "",
  },
});

function upper(e) {
  console.log("upper:", e);
}

function lower(e) {
  console.log("lower:", e);
}

function scroll(e) {
  console.log("scroll:", e);
}
</script>
